package cxm.mmp.aud;

// one source may be save source or read source
// depending how to use, onRecordData makes different behavior
// for Save Source, onRecodData() save data
// for Read Source, onRecordData() read data
public interface IRecordingSource {
	public enum RecordError {
		StartError,
		DataError,
		StopError
	};

	// do before data transfer, success to return 0
	public int onRecordStart();
	// do manipulate recording data
	// return data processed, less than 0 for error
	public int onRecordData(byte []data, int start, int num);
	// do after data transfer, success to return 0
	public int onRecordStop();
	public int onRecordError(RecordError error, int errno);
}
